#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
#define rep(i, a, b) for (int i = (a); i <= (b); i++)
#define per(i, a, b) for (int i = (a); i >= (b); i--)
#define endl '\n'
const int N = 1005;

int n, m;
int x[N], y[N];

void solve() {
  cin >> n;
  rep(i, 1, n) cin >> x[i] >> y[i];
  if (n & 1) {
    cout << 1 << endl;
    return;
  }
  sort(x + 1, x + n + 1);
  sort(y + 1, y + n + 1);
  int mid = n / 2;
  ll a = x[mid + 1] + 1 - x[mid];
  ll b = y[mid + 1] + 1 - y[mid];
  cout << a * b << endl;
}
int main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  int t;
  cin >> t;
  while (t--) solve();
  return 0;
}